<?php 
include '../../functions.php';
//一、获取旧内容
$id = intval($_GET['id']);
$data = include './data.php';
$oldData = $data[$id];
//二、修改
if(IS_POST){
	//覆盖原有数据
	$data[$id] = $_POST;
	//写入数据库
	file_put_contents('./data.php', "<?php return ".var_export($data,true)." ?>");
	success('修改成功', 'index.php');
}



//载入编辑模板
include './View/edit.html';
 ?>